home *** CD-ROM | disk | FTP | other *** search
/ Explorer - Mosaic & Web / Explorer - Mosaic & Web.iso / helpers / ghostvew / gvpm.inf (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1994-08-03  |  35.2 KB  |  981 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Overview ΓòÉΓòÉΓòÉ
  3.  
  4. PM GSview is a graphical interface for OS/2 Ghostscript. Ghostscript is an 
  5. interpreter for the PostScript page description language used by laser 
  6. printers. For documents following the Adobe PostScript Document Structuring 
  7. Conventions, GSview allows selected pages to be viewed or printed. GSview can 
  8. be used with Ghostscript 3.0 or later. GSview was inspired by Tim Theisen's X11 
  9. Ghostview program. 
  10.  
  11. Installation 
  12. Document Structuring Conventions 
  13. Opening a Document 
  14. Page Selection 
  15. Zoom 
  16. Document Information 
  17. Printing 
  18. Text Extract and Find 
  19. Clipboard 
  20. Options 
  21. Page Orientation 
  22. Page Size and Display Resolution 
  23. Keys 
  24. Command line options 
  25. Copyright 
  26. Common Problems 
  27. Internals 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 2. Installation ΓòÉΓòÉΓòÉ
  31.  
  32. First you need to install Ghostscript 3.0. This version of GSview will not work 
  33. with earlier versions of Ghostscript. 
  34.  
  35. Next install PM GSview by copying gvpm.exe and gvpm.hlp to your Ghostscript 
  36. directory. 
  37.  
  38. Start GSview then select Options | Ghostscript Command, and enter the correct 
  39. executable path and include path for Ghostscript. For example 
  40.  
  41.   c:\gs\gsos2.exe -Ic:\gs;c:\psfonts
  42.  
  43. It is essential that you get both the executable and the include path correct 
  44. otherwise GSview will either complain that it cannot run gsos2, or it will 
  45. start and then immediately exit with an error code. 
  46.  
  47. Set the environment variable TEMP to point to a directory for temporary files. 
  48. For example: 
  49.  
  50.   SET TEMP=c:\temp
  51.  
  52. The directory must exist and must be writeable. 
  53.  
  54. If you have some Type 1 fonts on your system, it may be possible to tell 
  55. Ghostscript to use them.  See Fontmap.os2 and Fontmap.atm supplied with 
  56. Ghostscript for examples. 
  57.  
  58. If you have problems, try reading the help topic Common Problems. 
  59.  
  60. To uninstall GSview, remove the files you installed above, then remove 
  61. c:\os2\gvpm.ini from the appropriate system directory. 
  62.  
  63.  
  64. ΓòÉΓòÉΓòÉ 3. Document Structuring Conventions ΓòÉΓòÉΓòÉ
  65.  
  66.   Adobe has defined a set of extended comment conventions that provide 
  67. additional information about the page structure and resource requirements of a 
  68. PostScript file. If a file contains these Document Structuring Convention (DSC) 
  69. comments, GSview can display pages in random order using Goto Page and display 
  70. pages in reverse order using Previous Page.  Selected pages can be extracted to 
  71. another file or printed. 
  72.  
  73. If a file does not contain DSC comments, GSview can only display the pages in 
  74. the original order. 
  75.  
  76. DSC conforming files start with the comment line: 
  77.  
  78.  %!PS-Adobe-3.0
  79.  
  80. where the number 3.0 may change and is the DSC version number. Some programs 
  81. write PostScript files with a control-D as the first character of the file, 
  82. followed by the comment line mentioned above. GSview will correctly report that 
  83. these files are not DSC conforming, but will still display them with page 
  84. selection features available. Complain to the author of the program that 
  85. produced the PostScript file. To make the file DSC conforming, edit it to 
  86. remove the control-D character. 
  87.  
  88. DSC conforming files contain lines such as: 
  89.  
  90.  %%Pages: 24
  91.  %%Page: 1 1
  92.  
  93. These lines tell GSview how many pages a document contains and where they 
  94. start.  GSview uses this information to select individual pages. 
  95.  
  96. Encapsulated PostScript Files (EPSF) are single page documents that contain a 
  97. subset of the DSC comments and PostScript commands. EPS files start with the 
  98. comment line: 
  99.  
  100.  %!PS-Adobe-3.0 EPSF-3.0
  101.  
  102. EPS files are commonly used for inclusion in other documents and for this 
  103. reason require the bounding box comment: 
  104.  
  105.   %%BoundingBox: llx lly urx ury
  106.  
  107. where llx, lly, urx and ury are integers giving the x and y coordinates of the 
  108. lower left and upper right corners of a bounding box which encloses all marks 
  109. made on the page. 
  110.  
  111. Some EPS files contain a preview of the PostScript document. This preview can 
  112. be a Windows Metafile, a TIFF file, or an Interchange preview (EPSI format). 
  113. For the Windows Metafile or TIFF file preview, the EPS file under DOS contains 
  114. a binary header which specifies the location and lengths of the preview and 
  115. PostScript language sections of the EPS file. For the Interchange format, the 
  116. preview is contained in DSC comments starting with 
  117.  
  118.  %%BeginPreview: width height depth lines
  119.  
  120. An EPS file with a preview can be created from an EPS file without a preview 
  121. using Add EPS Preview. 
  122.  
  123.  
  124. ΓòÉΓòÉΓòÉ 4. Opening a Document ΓòÉΓòÉΓòÉ
  125.  
  126.   The Open command on the File menu opens a file and displays the first page. 
  127.  
  128. If the file contains DSC comments, pages can be selected using Next Page, 
  129. Previous Page and Goto Page. 
  130.  
  131. If the file does not contain DSC comments, Previous Page and Goto Page will not 
  132. work.  Another file should not be selected until a last page of the file has 
  133. been displayed. 
  134.  
  135. When a file is open, GSview will display the document filename, the current 
  136. page (if available) and while the cursor is over the image, the location of the 
  137. cursor in coordinates specified by Options | Units.  The coordinate can be 
  138. PostScript points (1/72"), millimetres or inches. The cursor location is useful 
  139. for calculating bounding boxes. 
  140.  
  141. The Select File command is similar to Open but it does not display the 
  142. document. This command is useful for opening a document prior to printing it. 
  143.  
  144. The Close command closes the currently open document. This should be used 
  145. before the current file is changed by another program. If you do not do this 
  146. and GSview detects that the file length or date have changed, it will close 
  147. Ghostscript and rescan the document. 
  148.  
  149. See also Print. 
  150.  
  151.  
  152. ΓòÉΓòÉΓòÉ 5. Page Selection ΓòÉΓòÉΓòÉ
  153.  
  154.   Next Page moves to the next page of a document. This works even if the 
  155. document does not contain DSC comments. 
  156.  
  157. Previous Page moves to the previous page. 
  158.  
  159. Redisplay redisplays the current page. 
  160.  
  161. Goto Page shows a dialog box which allows selection of the next page number to 
  162. display.  The Select Page dialog box shows page labels since these are likely 
  163. to be more useful than a sequential page number. 
  164.  
  165. The Previous Page, Redisplay and Goto Page commands work only if the document 
  166. contains DSC comments. 
  167.  
  168.  
  169. ΓòÉΓòÉΓòÉ 6. Zoom ΓòÉΓòÉΓòÉ
  170.  
  171. To enlarge a displayed feature, position the cross-hair mouse pointer over the 
  172. feature then press the right mouse button. The window will swap from normal 
  173. display resolution to zoom resolution and the status line will have the word 
  174. Zoomed appended to it. The zoomed feature will be in the centre of the window. 
  175. To cancel Zoom, press the right mouse button again or select any command that 
  176. redraws the page (e.g. Redisplay, Next Page). By default the zoom resolution is 
  177. 300 dots per inch but this can be changed with the Media | Zoom Resolution 
  178. command. 
  179.  
  180. Zoom will only work for DSC conforming documents. 
  181.  
  182.  
  183. ΓòÉΓòÉΓòÉ 7. Document Information ΓòÉΓòÉΓòÉ
  184.  
  185. A brief information area at the top of the window is used by GSview to display 
  186. the document filename, the current page number and label (if available) and 
  187. while the cursor is over the image, the location of the cursor in coordinates 
  188. specified by Options | Units. The cursor location is useful for calculating 
  189. bounding boxes. 
  190.  
  191. The Info command on the File menu shows a dialog box with the following 
  192. information about the DSC comments in the current document. 
  193.  
  194. File is the full pathname to the document. 
  195.  
  196. Type is DSC, EPS, No DSC comments or 'Ignoring DSC Comments'. EPS is an 
  197. Encapsulated PostScript File - a single page document that contains a subset of 
  198. the DSC comments and PostScript commands. EPS files are commonly used for 
  199. inclusion in other documents. Ignoring DSC Comments is displayed if Options | 
  200. Ignore DSC is selected. 
  201.  
  202. Title is a text title that can be used when printing banner pages and for 
  203. routing or recognising documents. 
  204.  
  205. Date is the time the document was created. 
  206.  
  207. BoundingBox specifies a box that encloses all the marks painted on the page. 
  208. The four integer values are the coordinates of the lower left and upper right 
  209. corners of the bounding box in default user coordinates (1/72 inch). 
  210.  
  211. Orientation is either Portrait or Landscape. 
  212.  
  213. Default Media gives the media name followed by the width and height of that 
  214. media in default user coordinates (1/72 inch). 
  215.  
  216. Page Order is either Ascending, Descending or Special 
  217.  
  218. Pages is the total number of pages in the document. 
  219.  
  220. Page gives the page label and page number. 
  221.  
  222. Bitmap is the size of the display bitmap in pixels which may be useful if you 
  223. are copying the displayed image to the clipboard. 
  224.  
  225.  
  226. ΓòÉΓòÉΓòÉ 8. Printing ΓòÉΓòÉΓòÉ
  227.  
  228.   The Print command on the File menu allows printing of the document using 
  229. Ghostscript. The Ghostscript printer driver and resolution are selected using 
  230. the Select Device dialog box.  Pages are selected using the Select Pages dialog 
  231. box.  The All, Odd and Even buttons provide quick selection of pages. 
  232.  
  233. This list of available devices and resolutions is stored in the [Devices] 
  234. section of gvpm.ini. The default list of devices and resolutions is taken from 
  235. the standard distribution version of Ghostscript 3.0 and may not be complete. 
  236.  
  237. To print a document without displaying it, open the document using Select File. 
  238.  
  239. Print To File is similar to the Print command except that Ghostscript will 
  240. write the output to a file instead of sending it to a printer. 
  241.  
  242. If you want to produce a bitmap, some useful drivers are bmpmono, bmp16, bmp16m 
  243. and bmp256. 
  244.  
  245. Print File sends a file to a local port, bypassing the Presentation Manager 
  246. printer drivers. This is useful for sending a document to a PostScript printer, 
  247. or for sending an output file produced by Ghostscript to a printer. 
  248.  
  249. Extract allows a range of pages to be copied from the current document to a new 
  250. document.  For example, ten pages can be extracted from the middle of the 
  251. current document and written to another file, which will later be sent to a 
  252. printer. 
  253.  
  254. Properties 
  255. PS to EPS 
  256.  
  257.  
  258. ΓòÉΓòÉΓòÉ 8.1. Properties ΓòÉΓòÉΓòÉ
  259.  
  260. Some printer drivers allow extra properties to be specified. If two sections 
  261. are added to the gvpm.ini file for these printer drivers, GSview will enable 
  262. the Properties button which will display the Edit Properties dialog box. The 
  263. following example shows how to add property information for the cdjcolor 
  264. driver. First add a section which gives the current values. This section, after 
  265. the first character is removed, gives the options that will appear in the 
  266. Property list box. The first character is s for string or d for number. 
  267.  
  268.  [cdjcolor]
  269.  dBitsPerPixel=24
  270.  dDepletion=1
  271.  dShingling=2
  272.  dBlackCorrect=4
  273.  
  274. Next add a section which gives the values to display in the Value list box. 
  275.  
  276.  [cdjcolor values]
  277.  dBitsPerPixel=1,3,8,16,24
  278.  dDepletion=1,2,3
  279.  dShingling=0,1,2
  280.  dBlackCorrect=0,1,2,3,4,5,6,7,8,9
  281.  
  282. GSview will also add the value [Not defined] to the listbox. 
  283.  
  284. When you press the OK button in the Edit Properties dialog box, the current 
  285. settings are written to the gvpm.ini file. 
  286.  
  287. When GSview prints a file, it will give Ghostscript the contents of the 
  288. [cdjcolor] section of gvpm.ini as follows: 
  289.  
  290.  -dBitsPerPixel=24 -dDepletion=1 -dShingling=2 -dBlackCorrect=3
  291.  
  292. If the value of a property is [Not defined], that property will not be sent to 
  293. Ghostscript. 
  294.  
  295. Some entries for the cdj family of drivers are supplied in the property.ini 
  296. file that comes with GSview. 
  297.  
  298.  
  299. ΓòÉΓòÉΓòÉ 8.2. PS to EPS ΓòÉΓòÉΓòÉ
  300.  
  301. In general, it is not possible to convert a PostScript file to EPS. However, 
  302. many single page PostScript files can be converted to EPS by changing the first 
  303. line of the file to 
  304.  
  305.  %!PS-Adobe-3.0 EPSF-3.0
  306.  
  307. and then adding or fixing up the %%BoundingBox comment. 
  308.  
  309. When used incorrectly, the PS to EPS command can produce PostScript files with 
  310. incorrect DSC comments.  Such a document will cause problems when you try to 
  311. include it inside another document. 
  312.  
  313. To convert a PostScript file to EPS, the original file must be a single page 
  314. document.  If the document contains DSC comments and is multi page, extract the 
  315. desired page with File | Extract. If the document does not contain DSC 
  316. comments, you will need to edit the file by hand to extract the desired page. 
  317.  
  318. EPS documents must not use any of the following operators: 
  319.  
  320.  banddevice   clear         cleardictstack  copypage
  321.  erasepage    exitserver    framedevice     grestoreall
  322.  initclip     initgraphics  initmatrix      quit
  323.  renderbands  setglobal     setpagedevice   setpageparams
  324.  setshared    startjob      letter          note
  325.  legal        a3            a4              a5
  326.  
  327. The following operators should be used with care: 
  328.  
  329.  nulldevice   setgstate     sethalftone    setmatrix
  330.  setscreen    settransfer   setcolortransfer
  331.  
  332. It is your responsibility to make sure that the above requirements are met. 
  333.  
  334. To test if a document contains any of the above operators, select Options | EPS 
  335. Warn and then Open the desired document. After the page has been displayed, 
  336. look in the Ghostscript text window. If any of the above operators have been 
  337. used you should see lines like: 
  338.  
  339.  Warning: EPS files must not use ...
  340.  
  341. If you find these warnings then do not use PS to EPS. Remember to turn off EPS 
  342. Warn afterwards. 
  343.  
  344. A document must be displayed before PS to EPS is used. The document must 
  345. contain a showpage. This is required so that the bounding box can be measured. 
  346.  
  347. For documents without DSC comments, PS to EPS allows a bounding box to be 
  348. specified, then writes out an EPS file consisting of an EPS wrapper around the 
  349. original document. 
  350.  
  351. For documents with DSC comments, PS to EPS will change the first line of the 
  352. file to 
  353.  
  354.  %!PS-Adobe-3.0 EPSF-3.0
  355.  
  356. then allows the %%BoundingBox comment to be changed or added. 
  357.  
  358. For EPS documents, PS to EPS allows the %%BoundingBox comment to be changed. 
  359.  
  360. PS to EPS does not clip the document to the %%BoundingBox. To do so would 
  361. require changing the PostScript code itself. PS to EPS only changes the DSC 
  362. comments. 
  363.  
  364. PS to EPS does not add a preview to a document. If you want a preview you add 
  365. it with Edit | Add EPS Preview after first creating an EPS file with a correct 
  366. %%BoundingBox. 
  367.  
  368. See also Add EPS Preview, Extract, EPS Warn. 
  369.  
  370.  
  371. ΓòÉΓòÉΓòÉ 9. Text Extract and Find ΓòÉΓòÉΓòÉ
  372.  
  373.    In general, extracting text from a PostScript document is not a trivial 
  374. operation.  Words may be broken.  Text may be encoded. Ligatures may be used 
  375. (e.g replacing 'fi' with a single character). There may be no relationship 
  376. between the location of a word in the PostScript file and its location on the 
  377. page. 
  378.  
  379. However, it is common for PostScript documents to contain text in the same 
  380. order as it appears on the page, and for it to be given in PostScript strings, 
  381. surrounded by parentheses.  Complete lines may be given in one string, or one 
  382. word per string.  For this sort of document, extracting text can be done with 
  383. reasonable success. 
  384.  
  385. Edit | Text Extract will extract text contained in strings from specified pages 
  386. and write it to a text file. Line breaks in this text file correspond to lines 
  387. in the document. Spaces in the text file correspond to spaces within strings, 
  388. or to separate strings.  A more effective method of extracting text is to use 
  389. ps2ascii.ps supplied with Ghostscript. 
  390.  
  391. Edit | Find will search for text and display the first page that contains the 
  392. text.  Find asks for a search text and a range of pages in which to search. The 
  393. preceeding comments about extracting text from a PostScript document should be 
  394. noted.  Find first extracts text from the document, then searches it ignoring 
  395. all spaces in both the document and the search text.  Case is ignored when 
  396. searching. Consequently the search text these would match both These and The 
  397. serial.  No information is given about where the word is located on a given 
  398. page because this information is not available without a complete PostScript 
  399. interpreter. 
  400.  
  401. Edit | Find Next will continue the search from the next page. 
  402.  
  403.  
  404. ΓòÉΓòÉΓòÉ 10. Clipboard ΓòÉΓòÉΓòÉ
  405.  
  406.     The GSview window can be copied to the Clipboard as a bitmap by selecting 
  407. Copy from the Edit menu. 
  408.  
  409. An alternative way to get a bitmap output from Ghostscript is to use one of the 
  410. BMP drivers.  See Print. 
  411.  
  412. Paste To copies the currently displayed image (if available) to a BMP file. 
  413.  
  414. Add EPS Preview takes a bitmap from the display and uses it to add a preview to 
  415. an EPS file. Add EPS Preview can create a DOS EPS file with a TIFF preview, or 
  416. an EPSI file with an Interchange preview. To use the Add EPS Preview command 
  417. the following steps must be followed. 
  418.  
  419. 1. Make sure the document has a correct bounding box. A bounding box can be 
  420. added or changed using File | PS to EPS. 
  421.  
  422. 2. Select Orientation | Portrait. 
  423.  
  424. 3. Select Options | EPS Clip. This will cause Ghostscript to use a display 
  425. window the size of the bounding box instead of the page size. 
  426.  
  427. 4. Select Media | Resolution and set a suitable resolution for the preview.  If 
  428. the resolution is too high it make the EPS file excessively large. 
  429.  
  430. 5. Open an EPS file that does not contain a preview. 
  431.  
  432. 6. Select Edit | Add EPS Preview, then the preview format, then the new EPS 
  433. filename.  GSview will write a new file containing the original PostScript EPS 
  434. file and a preview created from the display bitmap. The available preview 
  435. formats are Interchange, TIFF 4 and TIFF 5. If adding an Interchange preview, 
  436. the document must have an %%EndComments line, otherwise GSview may put the 
  437. preview in the wrong place. A TIFF 5 preview is a Class B image with no 
  438. compression as described in Appendix G of the TIFF 5.0 memorandum.  A TIFF 4 
  439. preview is almost identical to the TIFF 5 preview, but avoids using tags which 
  440. are not described in the TIFF 4 specifiation. WordPerfect 5.1 requires a TIFF 4 
  441. preview. 
  442.  
  443. 7. Reset Orientation | Portrait, Options | EPS Clip and Media | Resolution to 
  444. their previous values. 
  445.  
  446. To extract the PostScript or Preview section from a DOS EPS file, use File | 
  447. Select File followed by Edit | Extract EPS then PostScript or Preview. 
  448.  
  449. See also PS to EPS. 
  450.  
  451.  
  452. ΓòÉΓòÉΓòÉ 11. Options ΓòÉΓòÉΓòÉ
  453.  
  454. The Options menu has the following selections: 
  455.  
  456. Ghostscript Command 
  457. Sounds 
  458. Units 
  459. Save Settings 
  460. Safer 
  461. Save Last Directory 
  462. Button Bar 
  463. Fit Window To Page 
  464. Quick Open 
  465. Auto Redisplay 
  466. EPS Clip 
  467. EPS Warn 
  468. Ignore DSC 
  469.  
  470.  
  471. ΓòÉΓòÉΓòÉ 11.1. Ghostscript Command ΓòÉΓòÉΓòÉ
  472.  
  473. The Ghostscript Command option allows selection of the command to use when 
  474. executing Ghostscript. A default will be constructed using the GSview path and 
  475. will look like: 
  476.  
  477.  gsos2.exe -Ic:\gs;c:\gs\fonts;c:\psfonts
  478.  
  479. GSview will first attempt to find Ghostscript in the GSview directory and then 
  480. will try the PATH. If GSview still cannot find Ghostscript, use this option to 
  481. set the full pathname to Ghostscript. If you wish to specify that Ghostscript 
  482. should look for its initialisation files in a different place, modify the -I 
  483. option. Only the Ghostscript EXE and include path may be specified - other 
  484. items will confuse GSview. 
  485.  
  486.  
  487. ΓòÉΓòÉΓòÉ 11.2. Sounds ΓòÉΓòÉΓòÉ
  488.  
  489. The Sounds option assigns sounds to various events. For each event the sound 
  490. can be set to None, a Speaker Beep or a Wave file. 
  491.  
  492. You must have a sound driver loaded before using Wave files. Wave file sounds 
  493. are not available under MS-Windows 3.0. 
  494.  
  495. The events are: 
  496.  
  497. Output Page: the PostScript showpage operator was executed. 
  498.  
  499. No Page: an invalid page was selected. For example, pressing Prev while on the 
  500. first page of a document with DSC comments. 
  501.  
  502. No Number: a command required page numbering and the document did not have page 
  503. numbering. For example, pressing Goto Page when viewing a document without DSC 
  504. comments. 
  505.  
  506. Not Open:  a command required a document to be open and this was not the case. 
  507. For example, pressing Goto Page when no document is open. 
  508.  
  509. Error: many types of errors. 
  510.  
  511. Timeout: no response from Ghostscript within a timeout period. For example, 
  512. display snowflak.ps on a PC with a 286-12 CPU. 
  513.  
  514. Start: GSview opened. 
  515.  
  516. Exit: GSview closed. 
  517.  
  518. The defaults are for No Page and Error to be a Speaker Beep and all other 
  519. events to be None. 
  520.  
  521.  
  522. ΓòÉΓòÉΓòÉ 11.3. Units ΓòÉΓòÉΓòÉ
  523.  
  524. The Units option sets the units used to display the cursor location on the 
  525. status bar.  Available units are PostScript points (pt = 1/72"), millimetres 
  526. (mm) and inches (in). The default is pt. 
  527.  
  528.  
  529. ΓòÉΓòÉΓòÉ 11.4. Save Settings ΓòÉΓòÉΓòÉ
  530.  
  531.   The Save Settings option saves the GSview window position, window size, last 
  532. used printer, last directory, Sounds, Units, Save Last Directory, User Defined, 
  533. Ghostscript Command, Button Bar, Fit Window To Page, Quick Open, Auto 
  534. Redisplay, EPS Clip, EPS Warn, Ignore DSC, Depth, Orientation, Media, 
  535. Resolution and Zoom Resolution options to the initialisation file gvpm.ini in 
  536. the OS/2 system directory. GSview reads this file during startup. 
  537.  
  538. When the Save Settings on Exit option is checked, GSview will automatically 
  539. save the above settings when you quit GSview. 
  540.  
  541.  
  542. ΓòÉΓòÉΓòÉ 11.5. Safer ΓòÉΓòÉΓòÉ
  543.  
  544. When the Safer option is checked, GSview will give Ghostscript the -dSAFER 
  545. flag, which disables the deletefile and renamefile operators, and the ability 
  546. to open files in any mode other than read-only. This is the default. 
  547.  
  548. When the Safer option is unchecked Ghostscript can change files. 
  549.  
  550.  
  551. ΓòÉΓòÉΓòÉ 11.6. Save Last Directory ΓòÉΓòÉΓòÉ
  552.  
  553. When the Save Last Directory option is checked, GSview will save the current 
  554. directory when you quit GSview.  When GSview is started next, this will be made 
  555. the current directory. This is the default. 
  556.  
  557. When Save Last Directory option is unchecked, the current directory when GSview 
  558. is started will be the directory where GSview is located, or the working 
  559. directory specified by the Program Manager. 
  560.  
  561.  
  562. ΓòÉΓòÉΓòÉ 11.7. Button Bar ΓòÉΓòÉΓòÉ
  563.  
  564.  When the Button Bar option is checked, GSview will display a Button Bar down 
  565. the left side of the window.  This is the default. The Button Bar contains the 
  566. following items in order from top to bottom: 
  567.  
  568. File | Open 
  569.  
  570. File | Print 
  571.  
  572. File | Info 
  573.  
  574. Help | Contents 
  575.  
  576. File | Goto Page 
  577.  
  578. File | Next Page 
  579.  
  580. File | Previous Page 
  581.  
  582. Go forward 5 pages 
  583.  
  584. Go back 5 pages 
  585.  
  586. Increase resolution by 1.2 
  587.  
  588. Decrease resolution by 1/1.2 
  589.  
  590. Edit | Find 
  591.  
  592. Edit | Find Next 
  593.  
  594. If using the increase/decrease resolution buttons, Auto Redisplay should be 
  595. set.  Instead of using these buttons, it is also possible to use the Media | 
  596. Resolution command. When the Button Bar option is unchecked, GSview will not 
  597. display the Button Bar. 
  598.  
  599.  
  600. ΓòÉΓòÉΓòÉ 11.8. Fit Window To Page ΓòÉΓòÉΓòÉ
  601.  
  602. When the Fit Window To Page option is checked, GSview will shrink the window 
  603. size so that it is no larger than the page being displayed.  This is the 
  604. default. 
  605.  
  606. If Fit Window To Page is unchecked, GSview will not resize the window and areas 
  607. outside the page will be drawn in light grey. This is useful if you do not wish 
  608. the window to shrink when looking at pages at low resolution. 
  609.  
  610.  
  611. ΓòÉΓòÉΓòÉ 11.9. Quick Open ΓòÉΓòÉΓòÉ
  612.  
  613. When the Quick Open option is checked, GSview will not reload Ghostscript 
  614. before every document, making opening of documents quicker. 
  615.  
  616. GSview tries to preserve the Ghostscript state between documents, but a 
  617. document may still leave the Ghostscript interpreter in an unusual state or 
  618. cause an error.  If an error occurs, Ghostscript will close. Error messages are 
  619. displayed in the Ghostscript window. Select Redisplay to reopen the document. 
  620.  
  621. If Quick Open is unchecked, GSview will close Ghostscript and restart it before 
  622. each new document or whenever the page orientation, resolution or size is 
  623. changed. 
  624.  
  625.  
  626. ΓòÉΓòÉΓòÉ 11.10. Auto Redisplay ΓòÉΓòÉΓòÉ
  627.  
  628. When the Auto Redisplay option is checked, GSview will redisplay DSC documents 
  629. when the Orientation, Resolution, Depth or Media are changed. This is the 
  630. default. 
  631.  
  632. If Auto Redisplay is unchecked, the File | Redisplay command must be used to 
  633. redisplay a document after changing the Orientation, Resolution, Depth or 
  634. Media. 
  635.  
  636.  
  637. ΓòÉΓòÉΓòÉ 11.11. EPS Clip ΓòÉΓòÉΓòÉ
  638.  
  639. When the EPS Clip option is checked, GSview will clip the display bitmap to the 
  640. bounding box of an EPS file instead of using the page size specified on the 
  641. Media menu.  This is useful when adding a bitmap preview to an EPS file. 
  642.  
  643. If EPS Clip is unchecked, GSview will use the page size specified on the Media 
  644. menu for EPS files.  This is the default. 
  645.  
  646. EPS Clip does not alter the original document, it only affects how much of the 
  647. document is displayed by GSview. 
  648.  
  649. See also Clipboard | Add EPS Preview 
  650.  
  651.  
  652. ΓòÉΓòÉΓòÉ 11.12. EPS Warn ΓòÉΓòÉΓòÉ
  653.  
  654. When the EPS Warn option is checked, GSview will write a prolog to Ghostscript 
  655. when each file is opened.  This prolog will produce warning messages in the 
  656. Ghostscript text window if any PostScript operators that should not be used in 
  657. EPS files are used.  An example warning message is: 
  658.  
  659.  Warning: EPS files must not use /initgraphics
  660.  
  661. EPS Warn is not infallible.  It is possible to access restricted operators 
  662. without EPS Warn producing a warning. 
  663.  
  664. The default for EPS Warn is unchecked. 
  665.  
  666. See also PS to EPS. 
  667.  
  668.  
  669. ΓòÉΓòÉΓòÉ 11.13. Ignore DSC ΓòÉΓòÉΓòÉ
  670.  
  671. Some documents incorrectly claim to conform to the Adobe Document Structuring 
  672. Conventions.  Attempting to display one of these bogus documents will probably 
  673. leave GSview horribly confused and unable to display the document.  If Ignore 
  674. DSC is checked, GSview will treat the document as if it does not contain DSC 
  675. comments and will only display the pages in the original order. 
  676.  
  677. The default for Ignore DSC is unchecked. 
  678.  
  679.  
  680. ΓòÉΓòÉΓòÉ 12. Page Orientation ΓòÉΓòÉΓòÉ
  681.  
  682.    The Portrait, Landscape, Upside-down and Seascape (reverse Landscape) 
  683. commands on the Orientation Menu select the page orientation used by the 
  684. display. Landscape implies a clockwise rotation of the paper by 90 degrees. 
  685. Seascape implies an anti-clockwise rotation of the paper by 90 degrees. These 
  686. orientation options only affect the display and do not affect the print 
  687. commands. If a DSC page orientation comment is found, the orientation will be 
  688. selected automatically. 
  689.  
  690. When the Swap Landscape option is checked, GSview swaps the meaning of 
  691. Landscape and Seascape. Most of the Landscape documents that I have encountered 
  692. require a 90 clockwise rotation of the paper to view. However, there is no 
  693. standard and some documents need to be rotated the other way. The Swap 
  694. Landscape button allows GSview to automatically rotate the document the right 
  695. way in response to the %%Orientation comment in the PostScript file. 
  696.  
  697. See also Page Size and Display Resolution. 
  698.  
  699.  
  700. ΓòÉΓòÉΓòÉ 13. Page Size and Display Resolution ΓòÉΓòÉΓòÉ
  701.  
  702.    The Resolution command on the Media menu selects the display resolution in 
  703. dots per inch. The default for a VGA display is 96 dots per inch. 
  704.  
  705. For DSC conforming files, pressing the right mouse button will zoom into the 
  706. page at what is usually printer resolution. Pressing the right mouse button a 
  707. second time will zoom back out to normal display resolution. The Zoom 
  708. Resolution command on the Media menu sets the zoom resolution in dots per inch. 
  709.  
  710. The Depth sub menu on the Media menu selects the display depth in bits per 
  711. pixels. 
  712.  
  713. The Media menu also allows selection of page size. Available page sizes are: 
  714.  
  715.  Letter          8.5 x 11   inch
  716.  Tabloid        11   x 17   inch
  717.  Ledger         17   x 11   inch
  718.  Legal           8.5 x 14   inch
  719.  Statement       5.5 x  8.5 inch
  720.  Executive       7.5 x 10   inch
  721.  A3              297 x 420  mm
  722.  A4              210 x 297  mm
  723.  A5              148 x 210  mm
  724.  B4              257 x 364  mm
  725.  B5              182 x 257  mm
  726.  Folio           8.5 x 13   inch
  727.  Quarto          8.5 x 10.8 inch
  728.  10x14          10   x 14   inch
  729.  
  730. A user defined size can be specified in PostScript points (1/72 inch) with the 
  731. User Defined command.  A size of 480x360 points at 96 dpi will give an image 
  732. size of 640x480 pixels. 
  733.  
  734. If a DSC media comment is found, the page type will be selected automatically. 
  735. If the media specification is not one of the above page types, the User Defined 
  736. size will be set. 
  737.  
  738.  
  739. ΓòÉΓòÉΓòÉ 14. Keys ΓòÉΓòÉΓòÉ
  740.  
  741. Following are the key assignments for GSview. 
  742.  
  743. O, o  Open and display a file.  (File | Open) 
  744.  
  745. C, c  Close file.  (File | Close) 
  746.  
  747. N, n, +  Next Page.  (File | Next Page) 
  748.  
  749. V, v, -  Previous Page.  (File | Previous Page) 
  750.  
  751. G, g  Goto Page.  (File | Goto Page) 
  752.  
  753. I, i  File information.  (File | Info) 
  754.  
  755. R, r  Redisplay page.  (File | Redisplay) 
  756.  
  757. S, s  Select file: open but don't display.  (File | Select File) 
  758.  
  759. P, p  Print all or some pages to a printer.  (File | Print) 
  760.  
  761. F, f  Print all or some pages to a File.  (File | Print To File) 
  762.  
  763. E, e  Extract some pages to another File.  (File | Extract) 
  764.  
  765. F1  Help.  (Help | Contents) 
  766.  
  767. Ctrl+C, Insert  Copy displayed bitmap to clipboard.  (Edit | Copy) 
  768.  
  769. Arrow Keys  Scroll by 16 pixels. 
  770.  
  771. Ctrl+Left  Scroll left one screen. 
  772.  
  773. Ctrl+Right  Scroll right one screen. 
  774.  
  775. Page Up  Scroll up one screen (window height). 
  776.  
  777. Page Down  Scroll down one screen. 
  778.  
  779. Home  Scroll to top of page. 
  780.  
  781. End  Scroll to bottom of page. 
  782.  
  783.  
  784. ΓòÉΓòÉΓòÉ 15. Command line options ΓòÉΓòÉΓòÉ
  785.  
  786. Usage: 
  787.  
  788.  gvpm [/D] filename
  789.  gvpm [/D] /F filename
  790.  gvpm [/D] /P filename
  791.  
  792. To start GSview and display filename.ps use: 
  793.  
  794.  gvpm filename.ps
  795.  
  796. To start GSview and print filename.ps using Ghostscript (File | Print) use: 
  797.  
  798.  gvpm /P filename.ps
  799.  
  800. To start GSview and print filename.ps to a file using Ghostscript (File | Print 
  801. To File) use: 
  802.  
  803.  gvpm /F filename.ps
  804.  
  805. To start GSview in debug mode use: 
  806.  
  807.  gvpm /D
  808.  
  809. In debug mode GSview will not remove its temporary files. This is to allow 
  810. inspection of these files after GSview has finished. 
  811.  
  812. GSview ignores the case of option: /p is the same as /P. 
  813.  
  814.  
  815. ΓòÉΓòÉΓòÉ 16. Copyright ΓòÉΓòÉΓòÉ
  816.  
  817. The About menu item shows the GSview copyright message and GSview version 
  818. number. 
  819.  
  820.  GVPM.EXE - A Ghostscript graphical interface
  821.  Copyright (C) 1993, 1994, Russell Lang.  All rights reserved.
  822.  
  823. This file is part of GSview. 
  824.  
  825. This program is distributed with NO WARRANTY OF ANY KIND.  No author or 
  826. distributor accepts any responsibility for the consequences of using it, or for 
  827. whether it serves any particular purpose or works at all, unless he or she says 
  828. so in writing.  Refer to the GSview Free Public Licence (the "Licence") for 
  829. full details. 
  830.  
  831. Every copy of GSview must include a copy of the Licence, normally in a plain 
  832. ASCII text file named LICENCE.  The Licence grants you the right to copy, 
  833. modify and redistribute GSview, but only under certain conditions described in 
  834. the Licence.  Among other things, the Licence requires that the copyright 
  835. notice and this notice be preserved on all copies. 
  836.  
  837.     Author: Russell Lang
  838.   Internet: rjl@monu1.cc.monash.edu.au
  839.  
  840.  
  841. ΓòÉΓòÉΓòÉ 17. Common Problems ΓòÉΓòÉΓòÉ
  842.  
  843.  Problem: Can't run gsos2... 
  844.  
  845. GSview requires OS/2 Ghostscript (gsos2.exe). This error message occurs if you 
  846. don't have OS/2 Ghostscript, or if GSview can't find OS/2 Ghostscript. 
  847.  
  848. From the GSview menu select Options | Ghostscript Command and enter the correct 
  849. executable path and include path for Ghostscript. For example: 
  850.  
  851.  c:\gs\gsos2.exe -Ic:\gs;c:\gs\fonts;c:\psfonts
  852.  
  853. You must set the include path for Ghostscript using either the -I command or 
  854. the GS_LIB environment variable. 
  855.  
  856. Problem: Ghostscript starts and then immediately exits with error code 1. 
  857.  
  858. Ghostscript probably couldn't find its initialisation files. Set the 
  859. Ghostscript include path by adding -Idirectory to the command in Options | 
  860. Ghostscript Command, where directory includes the name of the directory that 
  861. contains the Ghostscript initialisation files, Alternatively, set the 
  862. environment variable GS_LIB. 
  863.  
  864. Read the file use.doc that comes with Ghostscript. 
  865.  
  866. Problem: GSview says that a multipage PostScript file produced by MS-Windows 
  867. contains 0 pages and will only show the first page. 
  868.  
  869. This is because the document does not have correct DSC comments. From the 
  870. Control Panel, select Printers, Options..., then in the Print to group box 
  871. click on the Printer radio button.  You cannot use the Print To Encapsulated 
  872. PostScript File for printing multipage files.  The correct method is to connect 
  873. the printer to FILE:. In addition, from the Control Panel select Printers, 
  874. Options..., Advanced and then check Conform to Adobe Document Structuring 
  875. Convention. 
  876.  
  877. The DSC comment %%Pages: 0 means that the document does not produce any pages. 
  878. That is, the PostScript showpage operator is not used. If you find a PostScript 
  879. document that has multiple pages and contains the %%Pages: 0 comment, change 
  880. the first line from %!PS-Adobe- to %!. GSview will then ignore the DSC comments 
  881. and allow you to view all pages, but only in the original order.  Complain to 
  882. the author of the program that produced that PostScript file. 
  883.  
  884. Problem: PostScript files produced by MS-Windows start with a Control-D. 
  885.  
  886. Since this occurs even when the PostScript printer Conform to Document 
  887. Structuring Convention checkbox is checked, this must be considered a bug in 
  888. the MS-Windows PostScript printer driver. The bug fix is documented in the 
  889. MS-Windows PRINTERS.WRI file. Edit the win.ini file and search for the 
  890. PostScript printer section. There may be more than one.  In each of these 
  891. sections add CTRLD=0 as shown below. 
  892.  
  893.  [Apple LaserWriter II NT,FILE]
  894.  CTRLD=0
  895.  
  896. Problem: PostScript files produced by Word for Windows 6.0 cause a "Missing 
  897. %%Pages comment" message box. 
  898.  
  899. Congratulations.  You have just found a mistake in the DSC comments when Word 
  900. included an EPS file.  Word should have surrounded the included EPS file with 
  901. the lines 
  902.  
  903.  %%BeginDocument: filename.eps
  904.  %%EndDocument
  905.  
  906. Because Word didn't do this, GSview can't tell how many pages are in the 
  907. document and where they are located. 
  908.  
  909. Please complain to Microsoft.  There is a problem in the EPSIMP.FLT filter 
  910. version 2.01 which Microsoft needs to fix. 
  911.  
  912. In the interim, you have two solutions: 
  913.  
  914. 1. Select Options | Ignore DSC 
  915.  
  916. 2. Edit the PostScript file to correct the DSC comments. Search the PostScript 
  917. file for all lines containing 
  918.  
  919.   %MSEPS Preamble
  920.  
  921. From each of these lines, search forward for the start of the included EPS file 
  922. which should start with a line like 
  923.  
  924.  %%PS-Adobe-3.0 EPSF-3.0
  925.  
  926. Above these lines add the line 
  927.  
  928.  %%BeginDocument: AddedByHand
  929.  
  930. Then search for all lines containing 
  931.  
  932.  %MSEPS Trailer
  933.  
  934. Above these lines add the line 
  935.  
  936.  %%EndDocument
  937.  
  938. GSview should then be able to display the file correctly. 
  939.  
  940. Problem: Ghostscript always outputs to a printer instead of the GSview window. 
  941.  
  942. You must not use the GS_DEVICE environment variable. 
  943.  
  944.  
  945. ΓòÉΓòÉΓòÉ 18. Internals ΓòÉΓòÉΓòÉ
  946.  
  947. GSview starts Ghostscript for displaying using 
  948.  
  949.  gsos2 -dBitsPerPixel=x -dSAFER -rXDPIxYDPI -gWIDTHxHEIGHT -sGSVIEW=xxxx -
  950.  
  951. where xxxx is a string used to access a named shareable memory block, two 
  952. semaphores and a queue.  These are listed in gdevpm.h. The shareable memory 
  953. block contains a bitmap in BMP format. The SYNC semaphore is not used (it is 
  954. used by gspmdrv.exe instead). The NEXT semaphore is used when waiting at each 
  955. showpage. The MUTEX is used to sychronise access to the bitmap. The QUEUE is 
  956. used by Ghostscript to notify GSview about the following significant events: 
  957. 1. Starting to draw into bitmap, 2. Synchronise (redraw) page, 3. showpage 
  958. (redraw page), 4. Ghostscript is closing, 5. Ghostscript fatal error, 6. 
  959. Palette in bitmap has changed, 7. "-1 false .outputpage" is executed, 8. "-2 
  960. false .outputpage" is executed. PostScript code is piped to the Ghostscript 
  961. stdin. Ghostscript stdout goes to a window. 
  962.  
  963. GSview uses temporary files of the name gvXXXXXX in the directory given by the 
  964. TEMP environment variable. 
  965.  
  966. GSview starts Ghostscript for printing using 
  967.  
  968.  gsos2 @optfile
  969.  
  970. optfile contains 
  971.  
  972.  -dNOPAUSE
  973.  -dSAFER
  974.  -sDEVICE=devname
  975.  -rXDPIxYDPI
  976.  -gWIDTHxHEIGHT
  977.  -sOutputFile=outfilename
  978.  filename.ps
  979.  quit.ps
  980.  
  981.